import request from '@/utils/request'

// 管理员获取教员列表
export function getAdminTeacherList(params) {
  return request({
    url: '/teacher/admin/list',
    method: 'get',
    params
  })
}

// 管理员更新教员状态
export function updateTeacherStatus(id, status) {
  return request({
    url: `/teacher/admin/${id}/status`,
    method: 'post',
    params: { status }
  })
}

// 获取待审核教员列表
export function getPendingAuditList() {
  return request({
    url: '/teacher/admin/audit/pending',
    method: 'get'
  })
}

// 根据状态获取审核列表
export function getAuditListByStatus(status) {
  return request({
    url: '/teacher/admin/audit/list',
    method: 'get',
    params: { status }
  })
}

// 审核教员身份
export function auditTeacherIdentity(data) {
  return request({
    url: '/teacher/admin/audit',
    method: 'post',
    data
  })
}

// 获取教员详情
export function getTeacherDetail(id) {
  return request({
    url: `/teacher/${id}`,
    method: 'get'
  })
}

